<?php

defined('WEBWI_ROOT_PATH') or die('Restricted access');


function loadLanguage($name, $domain = '', $language = null)
{	
	
    if (empty($name)) {
        return false;
    }
    $language = empty($language) ? $GLOBALS['webwiConfig']['language'] : $language;
    $path = ((empty($domain) || 'global' == $domain) ? '' : "modules/{$domain}/" ) . 'language';
    if (!file_exists($fileinc = WEBWI_ROOT_PATH . DS . "{$path}/{$language}/{$name}.php")) {
        if (!file_exists( $fileinc = WEBWI_ROOT_PATH . DS . "{$path}/german/{$name}.php")) {
            return false;
        }
    }
    $ret = include_once $fileinc;
    return $ret;
}




?>